<?php
if(!defined('SYSTEM_PATH')) die('Cannot access this page directly or see your configuration file ') ;

require_once(SYSTEM_PATH.'database/result.php') ;
Loader::includeClass('database/result','persoSys') ;
/**
 * mysqlResult
 * 
 * @package 
 * @author mentiss
 * @copyright Copyright (c) 2007
 * @version $Id$
 * @access public
 */
class mysqlResult extends Result {
	/**
	 * mysqlResult::result_array()
	 * 
	 * @return array
	 */
	public function result_array() {
		if(!$this->_idQuery) return false;
		
		$result = array() ;
		while($row = @mysql_fetch_array($this->_idQuery)) {
			$result[] = $row ;
		}
		return $result;
	}
	/**
	 * mysqlResult::result_rows()
	 * 
	 * @return array
	 */
	public function result_rows() {
		if(!$this->_idQuery) {
			return false;
		}
		$result = array() ;
		while($row = @mysql_fetch_row($this->_idQuery)) {
			$result[] = $row ;
		}
		return $result;
	}
	/**
	 * mysqlResult::result_object()
	 * 
	 * @return object
	 */
	public function result_object() {
		if(!$this->_idQuery) return false;
		return @mysql_fetch_object($this->_idQuery) ;
	}
	/**
	 * mysqlResult::result_assoc()
	 * 
	 * @return 
	 */
	public function result_assoc() {
		if(!$this->_idQuery) return false;
		return @mysql_fetch_assoc($this->_idQuery) ;
	}
	/**
	 * mysqlResult::num_rows()
	 * 
	 * @return int
	 */
	public function num_rows() {
		if(!$this->_idQuery) {
			 return false;
		}
		return @mysql_num_rows($this->_idQuery) ;
	}
}
?>